﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Data;


namespace Presentation
{
    public partial class cadastraCurso : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            TBCurso obj = new TBCurso();

            obj.Duracao = Convert.ToInt32(duracao.Text);
            obj.Nome = duracao.Text;
            obj.SobreCurso = duracao.Text;
            obj.Mensalidade = Convert.ToDecimal(duracao.Text);

            using (DBUCNEntities banco = new DBUCNEntities())
            {
                banco.AddToTBCursoes(obj);
                banco.SaveChanges();
            }
            
        }

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        protected void EntityDataSource1_Selecting(object sender, EntityDataSourceSelectingEventArgs e)
        {

        }
    }
}